#!/usr/bin/python



import syslog;

import time;



def createMotion():
  
value = 0;
  
return value;


value = createMotion();


while(1):
  
if value == 0:
    
syslog.openlog(ident="MotiontSensor",logoption=syslog.LOG_PID,facility=syslog.LOG_LOCAL1);
    
syslog.syslog(syslog.LOG_INFO,'<info> Motion detected');
   
time.sleep(2);
    
syslog.closelog();
 
  
else:
    
syslog.openlog(ident="MotiontSensor",logoption=syslog.LOG_PID,facility=syslog.LOG_LOCAL1);
    
syslog.syslog(syslog.LOG_INFO,'<info> No Motion detected');
    
syslog.closelog();